import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.Scanner;

public class App1 {

    public static void main(String[] args) {
        System.out.println("App1 开始启动...,ProcessID:  "+getProcessID());
        Scanner scanner = new Scanner(System.in);
        scanner.hasNext();
        System.out.println("App1 启动完成");
    }

    public static final int getProcessID() {
        RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
        System.out.println(runtimeMXBean.getName());
        return Integer.valueOf(runtimeMXBean.getName().split("@")[0])
                .intValue();
    }

}
